package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.PersonCommissionAuthorityForm;
import com.zhijian.medical.entity.vo.request.PersonCommissionAuthorityFormSearchVo;
import com.zhijian.medical.entity.vo.response.PersonCommissionAuthorityFormVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PersonCommissionAuthorityFormMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PersonCommissionAuthorityForm record);

    int insertSelective(PersonCommissionAuthorityForm record);

    PersonCommissionAuthorityForm selectByPrimaryKey(Long id);

    /**
     * 根据人员ID查询
     *
     * @param personId
     * @return
     */
    PersonCommissionAuthorityForm selectByPersonId(Long personId);

    int updateByPrimaryKeySelective(PersonCommissionAuthorityForm record);

    int updateByPrimaryKey(PersonCommissionAuthorityForm record);

    int count(PersonCommissionAuthorityFormSearchVo personCommissionAuthorityFormSearchVo);

    List<PersonCommissionAuthorityFormVo> selectList(PersonCommissionAuthorityFormSearchVo personCommissionAuthorityFormSearchVo);

    PersonCommissionAuthorityFormVo selectVoById(Long id);

    int insertBatch(@Param("entities") List<PersonCommissionAuthorityForm> entities);

    /**
     * 查询出某天最新数据的code
     *
     * @param day
     * @return
     */
    String selectMaxCodeByDay(String day);
}